package com.shycloud.mido.member.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shycloud.mido.member.api.entity.MemberPriceIos;
import com.shycloud.mido.member.mapper.MemberPriceIosMapper;
import com.shycloud.mido.member.service.MemberPriceIosService;

import lombok.AllArgsConstructor;

/**
 *	IOS 会员价格实现
 *  @author yyy
 *  @date 2019/05/20
 */
@Service
@AllArgsConstructor
public class MemberPriceIosServiceImpl extends ServiceImpl<MemberPriceIosMapper, MemberPriceIos> implements MemberPriceIosService {

	private MemberPriceIosMapper memberPriceIosMapper;

	/**
	 * 保存IOS会员价格
	 * @param memberPriceIos 会员价格实体
	 */
	@Override
	public void saveIosPrice(MemberPriceIos memberPriceIos){
		if(null!=memberPriceIos.getId()){
			memberPriceIosMapper.updIosPrice(memberPriceIos);
		}else{
			memberPriceIosMapper.saveIosPrice(memberPriceIos);
		}
	}

	/**
	 * 查询IOS会员价格列表
	 * @param type 会员类型
	 * @return
	 */
	@Override
	public List<MemberPriceIos> selIosMemberPrice(String type){
		return memberPriceIosMapper.selMemberPriceIos(type);
	}
}
